package com.idanchuang.component.config.apollo.config;

/**
 * @author yjy
 * @date 2019/12/24 15:39
 **/
public class ApolloConfigBean {

    private static final String APP_NAMESPACE = "application";

    private boolean enabled = true;

    private String namespaces;

    public String[] getNamespacesList() {
        if (this.namespaces == null) {
            return new String[] {APP_NAMESPACE};
        } else {
            return this.namespaces.replace(" ", "").split(",");
        }
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getNamespaces() {
        return namespaces;
    }

    public void setNamespaces(String namespaces) {
        this.namespaces = namespaces;
    }
}
